<?php
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
    'id' => 'user-form',
    'enableClientValidation' => true,
    'htmlOptions' => array(
        'enctype' => 'multipart/form-data',
    ),
    'type' => 'horizontal',
        ));

echo $form->errorSummary($model);
echo $form->errorSummary($profile);
?>

<div class="tab-content">


    <div class="span6">

        <div class="control-group">
            <label class="control-label">Password (*)</label>
            <div class="controls">
                <?php echo $form->passwordfield($model, 'user_password') ?>
                <?php echo $form->error($model, 'user_password') ?>
                <p class="help-block">Empty to keep current</p>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label">Repeat Password (*)</label>
            <div class="controls">
                <?php echo $form->passwordfield($model, 'repassword') ?>
            </div>
        </div>

        <?php //echo $form->dropDownListRow($model, 'user_role', User::getRoles()) ?>

        <?php echo $form->dropDownListRow($model, 'user_status', User::getStatus()); ?>
        <div class="control-group">
            <label class="control-label">Avatar</label>
            <div class="controls">
                <img src="<?php echo $model->getAvatarUrl() ?>" title="" />
                <br/>
                <?php echo CHtml::fileField('avatar') ?>
            </div>
        </div>
    </div>
    <div class="span5">
        <?php echo $form->textFieldRow($model, 'user_firstname') ?>
        <?php echo $form->textFieldRow($model, 'user_lastname') ?>
        <?php echo $form->textFieldRow($model, 'user_nicename') ?>
        <?php echo $form->textFieldRow($model, 'user_email') ?>

        <?php //echo $form->datepickerRow($model, 'birthdate', array('prepend' => '<i class="icon-calendar"></i>')); ?>
        <?php //echo $form->textFieldRow($model, 'user_company_name') ?>
        <?php //echo $form->textAreaRow($model, 'user_company_address') ?>
        <?php echo $form->textFieldRow($model, 'user_phone') ?>
        <?php //echo $form->textFieldRow($model, 'user_company_email') ?>
    </div>

</div>


<div class="form-actions">
    <input type="submit" class="btn btn-primary" value="Save" />
</div>

<?php $this->endWidget(); ?>